package pers.kw.enums;

import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;

/**
 * 企业角色枚举
 */
public enum CompRoleEnum {

    C101("C101", "核心企业"),
    C102("C102", "供应商"),
    C103("C103", "投资机构"),
    ;

    private String code;
    private String mark;

    CompRoleEnum(String code, String mark) {
        this.code = code;
        this.mark = mark;
    }

    /**
     * Gets code.
     *
     * @return the code
     */
    public String getCode() {
        return code;
    }

    /**
     * Gets mark.
     *
     * @return the mark
     */
    public String getMark() {
        return mark;
    }

    /**
     * Get list list.
     *
     * @return the list
     */
    public static List getList() {
        List<Map<String, Object>> list = new ArrayList<Map<String, Object>>(values().length);
        Map<String, Object> map = null;
        for (CompRoleEnum be : values()) {
            map = new HashMap<String, Object>(2);
            map.put("code", be.getCode());
            map.put("mark", be.getMark());
            list.add(map);
        }
        return list;
    }
}
